package cn.micai.base.math;

/**
 * 描述：(挑战题)计算1+1/2+1/3+1/4+1/5+1/6+1/7+1/8+1/9+1/10=?。
 * <p>
 *
 * @author: 赵新国
 * @date: 2018/2/23 10:27
 */
public class F {

    public static void main(String [] args) {

        double sum = 0;

        for (int i=1; i<=10; i++) {
            sum = sum+1/(double)i;
        }

        System.out.println(sum);

    }
}
